<!doctype html>
<html>
<head></head>
<body>
	<!-- json2 is included because some browsers doesnt have it (e.g. ie8)	-->
	<script src="http://ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script>
	
	<script src="../easyWebSocket.min.js"></script>  
	<script>
	    var socket = new EasyWebSocket("ws://example.com/resource");
	    socket.onopen   = function(){
		socket.send("hello world!")
	    }
	    socket.onmessage= function(event){
		alert("received "+ event.data)
	    }
	</script>
</body>
</html>
